<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Rec_model extends CI_Model { 
   
   protected $table = 'billing';   
   function __construct()
   {        
        parent::__construct();
		
		$this->load->database();
   }   
   function count_all($reqid2u)    
   {					
	$this->db->like('reqid', $reqid2u, 'after');
	$this->db->from('billing');
	return $this->db->count_all_results();   
   }  
   
   function list_recs($limit,$offset) 
   {			
	$reqid2u = $this->session->userdata('reqid2u');
	$this->db->limit($limit,$offset); 
	$this->db->like('reqid', $reqid2u, 'after');    
	$query = $this->db->get($this->table);
    return $query->result_array();
   }       
 }